#include <iostream>
#include <string>

using namespace std;

struct stu
{
public:
    string name;
    int id;
public:
    stu() {}
    stu(string name ,int id)
        :name(name) ,id(id)
    {

    }
};

ostream & operator<<(ostream & os , const stu & c)
{
    os << "姓名 " << c.name << "\t学号" << c.id;
    return os;
} 

template <class Element_type>
class list
{
private:
    Element_type data[50];
    int len;
public:
    list()
    {
        len = 0;
    }
    ~list()
    {

    }
public:
    void push_back(Element_type data)
    {
        this->data[len] = data;
        len++;
    }
    void pop_back()
    {
        len--;
    }

    void print_list()
    {
        for (size_t i = 0; i < len; i++)
        {
            cout << data[i] << endl;
        }
        
    }
};

int main(int argc, char const *argv[])
{
    list<stu> L;
    L.push_back(stu("唐三",1));
    L.push_back(stu("萧炎",2));
    L.push_back(stu("张三",3));
    L.push_back(stu("李四",4));
    
    L.print_list();
    
    return 0;
}
